package com.luke.springcloud.inter;

import com.luke.springcloud.entities.CommonResult;
import com.luke.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient("CLOUD-PAYMENT-SERVICE")
@FeignClient(value = "cloud-payment-service",fallback = PaymentServiceFeignFallback.class)
public interface PaymentServiceFeign {

    @GetMapping(value = "/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/payment/testSentinel")
    public String testSentinel(@RequestParam("name") String name);

}
